Skip to content

Conversation

@epatey
Copy link
Contributor

@epatey epatey commented Nov 26, 2025

No description provided.

@epatey epatey force-pushed the spawn branch 7 times, most recently from 635fea0 to 99b3aae Compare December 1, 2025 21:34
@epatey epatey marked this pull request as ready for review December 1, 2025 21:40
Copy link
Contributor

@jjallaire jjallaire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks tight to me! The fact that the IPC context already established a clean boundary appears to have made this way less risky/intrusive than it otherwise would have been.

patch_inspect_log_handler(_log_in_parent)

# Set up sys.path with plugin directories before any user imports
for plugin_dir in ipc_ctx.plugin_dirs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that we basically get all of the "local" scanner directories in the sys path? (i.e. could they conflict with each other). Chance of this seems highly remote as it would require multiple plugin scanners in different directories so I think it would be fine if it was a "known issue" (or maybe I don't understand this clearly enough).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jjallaire, all registered plugin directories get added to sys.path in the MP subprocesses. In practice only one directory gets registered per CLI invocation because scanners_from_file and scanjob_from_file are mutually exclusive.

Multiple dirs could accumulate if someone ran multiple scout scan commands programmatically in the same process. I think the conflict would multiple plugins in different dirs with same module names.

That does seem pretty fringe, so I agree it's fine for this to be a known limitation.

@epatey epatey merged commit 160eff5 into main Dec 2, 2025
8 checks passed
@epatey epatey deleted the spawn branch December 2, 2025 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants